package com.tang.algorithm.string;

import java.util.HashSet;

/**
 * @author tlm
 * @version 1.0
 * @date 2020/6/20 19:45
 */
public class Mst0101 {
    public boolean isUnique(String astr) {
        HashSet<Character> hashSet = new HashSet<>();
        for (int i = 0; i <astr.length() ; i++) {

            if(hashSet.contains(astr.charAt(i))){
                return false;
            }else {
                hashSet.add(astr.charAt(i));
            }
        }
        return true;
    }

}
